//
//  WHCoopHeaderView.m
//  SquirrelCourier
//
//  Created by 邓伟浩 on 2019/1/4.
//  Copyright © 2019 邓伟浩. All rights reserved.
//

#import "WHCoopHeaderView.h"

@interface WHCoopHeaderView ()

@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) UILabel *moneyLabel;
@property (nonatomic, strong) UILabel *statusLabel;
@property (nonatomic, strong) UILabel *editLabel;

@end

@implementation WHCoopHeaderView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setMoneyDetailHeaderUI];
    }
    return self;
}

- (void)setMoneyDetailHeaderUI {
    [self addSubview:({
        _nameLabel = [[UILabel alloc] init];
        _nameLabel.textAlignment = NSTextAlignmentCenter;
        _nameLabel.adjustsFontSizeToFitWidth = YES;
        _nameLabel.textColor = CMDarkOrangeColor;
        _nameLabel.font = SYSTEMFONT(kRealwidth(15));
        _nameLabel.text = @"驿站名称";
        _nameLabel.backgroundColor = HexColor(@"ffeee5");
        
        ViewBorderRadius(_nameLabel, 0, 0.5, CLineColor);
        
        _nameLabel;
    })];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.left.mas_equalTo(self);
        make.width.mas_equalTo(kRealwidth(130));
    }];
    
    [self addSubview:({
        _moneyLabel = [[UILabel alloc] init];
        _moneyLabel.textAlignment = NSTextAlignmentCenter;
        _moneyLabel.adjustsFontSizeToFitWidth = YES;
        _moneyLabel.textColor = CMDarkOrangeColor;
        _moneyLabel.font = SYSTEMFONT(kRealwidth(15));
        _moneyLabel.text = @" 包裹保管费(元/件) ";
        _moneyLabel.backgroundColor = HexColor(@"ffeee5");
        
        ViewBorderRadius(_moneyLabel, 0, 0.5, CLineColor);
        
        _moneyLabel;
    })];
    [_moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.mas_equalTo(self);
        make.left.mas_equalTo(_nameLabel.mas_right);
        make.width.mas_equalTo(kRealwidth(115));
    }];
    
    [self addSubview:({
        _statusLabel = [[UILabel alloc] init];
        _statusLabel.textAlignment = NSTextAlignmentCenter;
        _statusLabel.adjustsFontSizeToFitWidth = YES;
        _statusLabel.textColor = CMDarkOrangeColor;
        _statusLabel.font = SYSTEMFONT(kRealwidth(15));
        _statusLabel.backgroundColor = HexColor(@"ffeee5");
        _statusLabel.text = @" 合作状态 ";
        
        ViewBorderRadius(_statusLabel, 0, 0.5, CLineColor);
        
        _statusLabel;
    })];
    [_statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.mas_equalTo(self);
        make.left.mas_equalTo(_moneyLabel.mas_right);
        make.width.mas_equalTo(kRealwidth(65));
    }];
    
    [self addSubview:({
        _editLabel = [[UILabel alloc] init];
        _editLabel.textAlignment = NSTextAlignmentCenter;
        _editLabel.adjustsFontSizeToFitWidth = YES;
        _editLabel.textColor = CMDarkOrangeColor;
        ViewBorderRadius(_editLabel, 0, 0.5, CLineColor);
        _editLabel.backgroundColor = HexColor(@"ffeee5");
        _editLabel.text = @"操作";
        
        _editLabel;
    })];
    [_editLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.mas_equalTo(self);
        make.left.mas_equalTo(_statusLabel.mas_right);
        make.width.mas_equalTo(kRealwidth(65));
    }];
    
    
}

@end
